package com.zst.dollars.handler.client;

import com.zst.dollars.common.Consts;
import com.zst.dollars.entity.signin.ServerSignInResponseMessage;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SignInResponseHandler extends SimpleChannelInboundHandler<ServerSignInResponseMessage> {
    private static final Logger logger = LoggerFactory.getLogger(SignInResponseHandler.class);
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, ServerSignInResponseMessage msg) throws Exception {
        logger.debug("收到注册的回复");
        ctx.channel().attr(Consts.smeaphoreKey).get().release();
    }
}
